package com.rqb.redisson.service;

import org.redisson.Redisson;
import org.redisson.api.RAtomicDouble;
import org.redisson.api.RedissonClient;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * Created by baiguantao on 2017/4/18.
 */
@Service
public class RedissonUtils2 implements InitializingBean {
    @Autowired
    private RedissonClient redissonClient;


    public void afterPropertiesSet() throws Exception {
        Redisson redisson= (Redisson) redissonClient;
       RAtomicDouble dd= redissonClient.getAtomicDouble("tt");
       dd.set(1.22);
        System.out.println("bean初始化后置方法"+redisson.getConfig().toJSON().toString());
    }
}
